package org.rcy.ruicingmarket.comment;

import org.rcy.ruicingmarket.comment.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @author RuicyWu
 * @Date 2022/3/25 10:10
 */
public interface CommentRepository extends MongoRepository<Comment,String> {
    Page<Comment> findByParentid(String parentId, Pageable pageable);
    Long countByParentid(String parentId);
    void deleteCommentByParentid(String parentId);
    Page<Comment> findCommentsBySkuIdAndParentId(String skuId,String parentId, Pageable pageable);
}
